package com.es.www.first;

import java.math.BigDecimal;

/**
 * @Created by michangtao
 * @Date 2022/5/25 10:23
 * @Description
 */
public class Client {

    public static void main(String[] args) {
        PurchaseRequest request = new PurchaseRequest(BigDecimal.valueOf(1000), "课桌");

        DepartmentHandler departmentHandler = new DepartmentHandler("张主任");
        CollegeHandler collegeHandler = new CollegeHandler("王院长");
        SchoolHandler schoolHandler = new SchoolHandler("徐校长");
        departmentHandler.setNextHandler(collegeHandler);
        collegeHandler.setNextHandler(schoolHandler);
        schoolHandler.setNextHandler(departmentHandler);

        schoolHandler.process(request);
    }
}
